https://leetcode-cn.com/problems/check-if-all-characters-have-equal-number-of-occurrences/

class Solution {
public:
    bool areOccurrencesEqual(string s) {
        int HX[256] = { 0 };
        for(int i = 0 ; i < s.size() ; ++i)
        {
            HX[s[i]]++;
        }
        int res = 0;
        for(int i = 0 ; i < 256 ; ++i) 
        {
            if(HX[i] != 0)
            {
                if(res == 0)
                    res = HX[i];
                else if(res != HX[i])
                    return false;
            }
        }
        return true;
    }
};